<?php

namespace common\models\trend;

use Yii;

/**
 * This is the model class for table "{{%trend_level}}".
 *
 * @property int $id
 * @property string $name 名称
 * @property string $thumb 等级图标
 * @property string $description 描述
 * @property int $experience 经验值
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class TrendLevel extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%trend_level}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['name', 'thumb'], 'required'],
            [['experience', 'created_at', 'updated_at'], 'integer'],
            [['name'], 'string', 'max' => 50],
            [['thumb'], 'string', 'max' => 255],
            [['description'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'name' => '名称',
            'thumb' => '等级图标',
            'description' => '描述',
            'experience' => '经验值',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
